﻿
namespace facecat
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
            m_absoluteLayout = new AbsoluteLayout();
            m_uiView = new FCUIView();
            AbsoluteLayout.SetLayoutBounds(m_uiView, new Rect(0, 0, 1000, 500));
            m_absoluteLayout.Children.Add(m_uiView);
            m_uiView.m_textBox = new Entry();
            m_uiView.m_textBox.IsVisible = false;
            m_absoluteLayout.Children.Add(m_uiView.m_textBox);
            m_absoluteLayout.SizeChanged += AbsoluteLayout_SizeChanged;
            Content = m_absoluteLayout;
        }

        public AbsoluteLayout m_absoluteLayout;

        public FCUIView m_uiView;

        private void AbsoluteLayout_SizeChanged(object? sender, EventArgs e)
        {
            AbsoluteLayout.SetLayoutBounds(m_uiView, new Rect(0, 0, m_absoluteLayout.Width, m_absoluteLayout.Height));
        }
    }
}
